export const deepReady = async (el: any | undefined): Promise<void> => {
  const element = el as any;
  if (element) {
    if (element.componentOnReady != null) {
      const stencilEl = await element.componentOnReady();
      if (stencilEl != null) {
        return;
      }
    }
    await Promise.all(Array.from(element.children).map(deepReady));
  }
};
/**
 * 显示DOM
 *
 * @param el
 */
export const show = (el: HTMLElement): void => {
  if (el) {
    el.removeAttribute('hidden');
    el.setAttribute('show', 'true');
  }
};
/**
 * 隐藏DOM
 *
 * @param el
 */
export const hidden = (el: HTMLElement): void => {
  if (el) {
    el.removeAttribute('show');
    el.setAttribute('hidden', 'true');
  }
};
